package com.lagou.wang.service.user;


import com.lagou.wang.dao.user.UserDao;
import com.lagou.wang.factory.UserDaoFactory;

import com.lagou.wang.pojo.User;

/**
 * @author wanggege
 * UserService接口实现类
 */
public class UserServiceImpl implements UseService{

    private UserDao userDao;

    /**
     * 利用合成复用原则和静态工厂获取dao
     */
    public UserServiceImpl() {
        this.userDao = UserDaoFactory.getUserDao();
    }


    /**
     * @param user
     * @return
     * 实现登录与数据库进行校验
     */
    @Override
    public User userLoginService(User user) {
        return userDao.userLogin(user);
    }


}

